package com.qdlc.p2p.dal.model;

import com.qdlc.p2p.dal.dto.EnjoyUser;
import org.springframework.beans.BeanUtils;

/**
 * Created by D on 2016/1/25.
 */
public class EnjoyUserModel extends EnjoyUser {

    private static final long serialVersionUID = 1L;

    /**
     * 状态-待发货
     */
    public static final byte ENJOY_STATUS_WAIT = 1;
    /**
     * 状态-已发货
     */
    public static final byte ENJOY_STATUS_GIVE = 2;
    /**
     * 状态-已失效
     */
    public static final byte ENJOY_STATUS_CANCEL=3;

    /**
     * 当前页码
     */
    private int page = 1;

    /**
     * 每页数据条数
     */
    private int rows = 5;

    /**
     * 用户名
     */
    private String userName;

    /**
     * 商品名称
     */
    private String goodsName;

    /**
     * 条件查询
     */
    private String searchName;

    /**
     * 标名称
     */
    private String borrowName;

    /**
     * 标uuid
     */
    private String uuid;

    /** 开始日期 **/
    private String startTime;
    /** 结束日期 **/
    private String endTime;
    /** 日期范围：0：全部，1：最近七天 2：最近一个月 3：最近两个月，4 最近三个月 **/
    private int time;

    public static EnjoyUserModel instance(EnjoyUser enjoyUser) {
        EnjoyUserModel enjoyUserModel = new EnjoyUserModel();
        BeanUtils.copyProperties(enjoyUser, enjoyUserModel);
        return enjoyUserModel;
    }

    public String getSearchName() {
        return searchName;
    }

    public void setSearchName(String searchName) {
        this.searchName = searchName;
    }

    public String getGoodsName() {
        return goodsName;
    }

    public void setGoodsName(String goodsName) {
        this.goodsName = goodsName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getBorrowName() {
        return borrowName;
    }

    public void setBorrowName(String borrowName) {
        this.borrowName = borrowName;
    }

    public int getPage() {
        return page;
    }

    public void setPage(int page) {
        this.page = page;
    }

    public int getRows() {
        return rows;
    }

    public void setRows(int rows) {
        this.rows = rows;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public int getTime() {
        return time;
    }

    public void setTime(int time) {
        this.time = time;
    }
}
